<div class="row">
    <div class="col-12">
        <div class="card">
            <div class="card-body">
                <form action="<?PHP echo $ACTION_URL; ?>" method="post" onSubmit="return checksub()"
                      enctype="multipart/form-data">
                    <table class="table table-bordered table-striped mb-0" style="width: 800px;" border="2">
                        <tr>
                            <label style="color: #ff213e;font-size: 25px;text-align: center; "><?php echo $MSG_FAULT; ?></label>
                            <label style="color: #0007ff;font-size: 25px;text-align: center; "><?php echo $MSG_OK; ?></label>
                        </tr>
                        <tr>
                            <th style="text-align: left;float:left;border-width: 0px;">
                                <label style="width:60px;display:inline-block;text-align: left;">机号：</label>
                                <input style="width: 100px " type="text" name="F_ACNO" id="F_ACNO"
                                       value="<?php echo $ACNO ?>"/>
                                <label>机型：</label>
                                <select style="width: 90px; height: 25px " id="ACTYPE" name="ACTYPE">
                                    <option value=""></option>
                                    <option value="A320">A320</option>
                                    <option value="B787">B787</option>
                                </select>
                                <label style="width:60px;display:inline-block;text-align: left;">章节：</label>
                                <input style="width: 100px " type="text" name="F_ATA" id="F_ATA"
                                       value="<?php echo $ATA ?>"/>
                                <label style="width:60px;display:inline-block;text-align: left;">状态：</label>
                                <select style="width: 90px; height: 25px " id="STATUE" name="STATUE">
                                    <option value="监控中">监控中</option>
                                    <option value="已关闭">已关闭</option>
                                </select>
                                <input type="submit" style="width: 80px" name="sub" value="保存">
                                <br>
                            </th>
                        </tr>
                        <tr>
                            <th style="text-align: left;float:left;border-width: 0px;">
                                <label style="width:60px;display:inline-block;text-align: left;">标题：</label>
                                <input style="width: 400px " type="text" name="F_TITLE" id="F_TITLE"
                                       value="<?php echo $TITLE ?>"/>
                                <label>日期：</label>
                                <input style="width: 130px;" id="F_DATE" type="DATE" name="F_DATE">
                                <br>
                            </th>
                        </tr>
                        <tr>
                            <th style="float: left;border-width: 0px">
                                <label style="width:60px;display:inline-block;">故障：</label>
                                <textarea id="F_TEXT" name="F_TEXT"
                                          style="width: 700px; height: 200px;"><?php echo $TEXT ?></textarea>
                            </th>
                        </tr>
                    </table>
                </form>
            </div>
        </div>
    </div>
</div>

<script>

    SetCalendarDate("F_DATE", <?php echo '"' . F_UnixToString($DATE) . '"' ?>);
    F_Operate_Select("STATUE", <?php echo '"' . $STATUE . '"' ?>);
    F_Operate_Select("ACTYPE", <?php echo '"' . $ACTYPE . '"' ?>);

    //检查是否为空
    function checksub() {
        var check = 0;
        check = check + checkemptybyid("F_DATE", "ErrorMSG", '日期不能为空！');
        check = check + checkemptybyid("F_TITLE", "ErrorMSG", '标题不能为空！');
        check = check + checkemptybyid("ACTYPE", "ErrorMSG", '机型不能为空！');
        if (check > 0) {
            return false;
        }
    }
</script>